home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
math
/
nrpas13
/
gammp.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-04-29
|
354b
|
16 lines
FUNCTION gammp(a,x: real): real;
VAR
gammcf,gln: real;
BEGIN
IF ((x < 0.0) OR (a <= 0.0)) THEN BEGIN
writeln('pause in GAMMP - invalid arguments'); readln
END;
IF (x < (a+1.0)) THEN BEGIN
gser(a,x,gammcf,gln);
gammp := gammcf
END ELSE BEGIN
gcf(a,x,gammcf,gln);
gammp := 1.0-gammcf
END
END;